package com.sky.loveshop.service;

import com.sky.loveshop.entity.WxMiniUser;
import com.sky.loveshop.entity.exception.BizException;
import com.sky.loveshop.entity.vo.DriverOpenDoorVO;
import com.sky.loveshop.entity.vo.WxMiniUserVO;
import com.sky.loveshop.entity.weChat.LogInRequest;
import com.sky.loveshop.entity.weChat.OpenDoorRequest;
import com.sky.loveshop.entity.weChat.ShortLinkRequest;
import com.sky.loveshop.entity.weChat.WXACodeUnLimitRequest;

/**
 * @author xcy
 * @version V1.0
 * @description 微信小程序相关service
 * @date 2024/9/1 11:21
 */
public interface WeChatMiniService {

    /**
     * 微信小程序登录注册
     */
    WxMiniUserVO wxLoginOrRegister(LogInRequest request);

    /**
     * 获取小程序跳转短链
     */
    String getShortLink(ShortLinkRequest request) throws BizException;

    /**
     * 门禁微信小程序码
     */
    byte[] getWXACodeUnLimit(WXACodeUnLimitRequest request) throws BizException;

    /**
     * 微信小程序获取用户手机号并绑定到用户身上
     */
    Integer wxGetUserPhoneNumber(LogInRequest request) throws BizException;

    /**
     * 门禁微信小程序用户获取手机号(新)
     */
    WxMiniUser wxGetNewPhone(LogInRequest request) throws BizException;

    /**
     * 用户开门 并校验用户是否在门店附近 并 进行下发开门指令
     */
    Integer userOpenDoor(LogInRequest request) throws BizException;

    /**
     * 骑手输入取货码开门
     */
    DriverOpenDoorVO driverOpenDoor(OpenDoorRequest request) throws BizException;
}
